package com.zbl.springdemo.bean;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import org.springframework.stereotype.Component;

@Component
public class BeanDemo implements Hello {
    @Override
    public void hello() {
        System.out.println("BeanDemo hello");
    }

    @PostConstruct
    public void init() {
        System.out.println("BeanDemo init");
    }

    @PreDestroy
    public void destroy() {
        System.out.println("BeanDemo destroy");
    }
}
